//
//  ViewController.swift
//  ZUSwiftTools
//
//  Created by zubuntu on 2020/4/20.
//  Copyright © 2020 zubuntu. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        self.btn.frame = CGRect.init(x: 100, y: 100, width: 100, height: 50)
        self.view.addSubview(self.btn)

        self.btn.addTouchUpInSideBtnAction { (btn) in
            print("测试按钮被点击了！！！")
        }
    }

    lazy var btn: UIButton = {
        let btn = UIButton()
        btn.backgroundColor = .green
        btn.setTitle("测试按钮", for: .normal)
        btn.setTitleColor(.red, for: .normal)

        return btn
    }()
}

